package com.ruoyi.system.vo;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * @author Ericcc
 * @version v0.01
 * @date 2021/2/6
 */
public class SysControlRes {
    private static final long serialVersionUID = 1L;

    /** 风控id */
    private Long controlId;

    /** 相关id */
    private Long relationId;

    /** 单笔订单最小金额 */
    private BigDecimal minBalance;

    /** 单笔订单最大金额 */
    private BigDecimal maxBalance;

    /** 当日总金额 */
    private BigDecimal todayBalance;

    /** 交易开始时间 */
    private String startTime;

    /** 交易结束时间 */
    private String endTime;

    /** 风控状态:(0.正常, 1.停用) */
    private Integer controlStatus;

    /** 单位时间限制 */
    private Long timeRange;

    /** 限制时间单位(1.秒, 2.分, 3.时, 4.天) */
    private Integer timeUnit;

    /** 单位时间次数 */
    private Long timeSize;

    /** 单位时间金额 */
    private BigDecimal timeBalance;

    /** 0.系统规则 1.通道规则 2.用户规则 */
    private Integer controlType;

    /** 风控状态:(true.正常, false.停用) */
    private Boolean controlStatusBn;

    public void setControlId(Long controlId)
    {
        this.controlId = controlId;
    }

    public Long getControlId()
    {
        return controlId;
    }
    public void setRelationId(Long relationId)
    {
        this.relationId = relationId;
    }

    public Long getRelationId()
    {
        return relationId;
    }
    public void setMinBalance(BigDecimal minBalance)
    {
        this.minBalance = minBalance.setScale(0);
    }

    public BigDecimal getMinBalance()
    {
        return minBalance;
    }
    public void setMaxBalance(BigDecimal maxBalance)
    {
        this.maxBalance = maxBalance.setScale(0);
    }

    public BigDecimal getMaxBalance()
    {
        return maxBalance;
    }
    public void setTodayBalance(BigDecimal todayBalance)
    {
        this.todayBalance = todayBalance.setScale(0);
    }

    public BigDecimal getTodayBalance()
    {
        return todayBalance;
    }
    public void setStartTime(String startTime)
    {
        this.startTime = startTime;
    }

    public String getStartTime()
    {
        return startTime;
    }
    public void setEndTime(String endTime)
    {
        this.endTime = endTime;
    }

    public String getEndTime()
    {
        return endTime;
    }

    public void setControlStatus(Integer controlStatus)
    {
        this.controlStatus = controlStatus;
        if (controlStatus==0){
            setControlStatusBn(true);
        }else {
            setControlStatusBn(false);
        }
    }

    public Integer getControlStatus()
    {
        return controlStatus;
    }
    public void setTimeRange(Long timeRange)
    {
        this.timeRange = timeRange;
    }

    public Long getTimeRange()
    {
        return timeRange;
    }
    public void setTimeUnit(Integer timeUnit)
    {
        this.timeUnit = timeUnit;
    }

    public Integer getTimeUnit()
    {
        return timeUnit;
    }
    public void setTimeSize(Long timeSize)
    {
        this.timeSize = timeSize;
    }

    public Long getTimeSize()
    {
        return timeSize;
    }
    public void setTimeBalance(BigDecimal timeBalance)
    {
        this.timeBalance = timeBalance.setScale(0);
    }

    public BigDecimal getTimeBalance()
    {
        return timeBalance;
    }
    public void setControlType(Integer controlType)
    {
        this.controlType = controlType;
    }

    public Integer getControlType()
    {
        return controlType;
    }

    public Boolean getControlStatusBn() {
        return controlStatusBn;
    }

    public void setControlStatusBn(Boolean controlStatusBn) {
        this.controlStatusBn = controlStatusBn;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("controlId", getControlId())
                .append("relationId", getRelationId())
                .append("minBalance", getMinBalance())
                .append("maxBalance", getMaxBalance())
                .append("todayBalance", getTodayBalance())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("controlStatus", getControlStatus())
                .append("timeRange", getTimeRange())
                .append("timeUnit", getTimeUnit())
                .append("timeSize", getTimeSize())
                .append("timeBalance", getTimeBalance())
                .append("controlType", getControlType())
                .toString();
    }
}
